package com.eighth.strategy.factory;


import com.eighth.strategy.DBSave;
import com.eighth.strategy.FileSave;
import com.eighth.strategy.ISave;
import com.eighth.strategy.NetSave;

public class SaveFactory {

    public static ISave getSave(String name){
        if ("file".equals(name)) {
            return new FileSave();
        }else if("net".equals(name)){
            return new NetSave();
        }else if("db".equals(name)) {
            return new DBSave();
        }else{
            return null;
        }
    }
}


